#!/bin/bash
dt=$(date "+%Y%m%d")
echo $dt
hive -e 'insert overwrite table homework.user_info select count(*), datestr from (select count(*) active_num, dt datestr from homework.user_clicks group by dt, id) a group by datestr;'
